package com.peteralbus.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.peteralbus.entity.EarthquakeInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;


/**
 * The interface Earthquake info mapper.
 * @author PeterAlbus
 * Created on 2022/1/20.
 */
@Mapper
// 为了让EarthquakeInfoMapper能够让别的类进行引用，我们可以在EarthquakeInfoMapper类上添加@Mapper注解
//直接在Mapper类上面添加注解@Mapper，这种方式要求每一个mapper类都需要添加此注解
//通过使用@MapperScan可以指定要扫描的Mapper类的包的路径,在启动类中
//@SpringBootApplication
//@MapperScan("com.peteralbus.*.mapper")
//或者@MapperScan("com.peteralbus.mapper")
public interface EarthquakeInfoMapper extends BaseMapper<EarthquakeInfo>
{
    /**
     * Query info with line list.
     *
     * @param parameter the parameter which can contain earthquakeId,startIndex,pageSize
     * @return the list
     */
    List<EarthquakeInfo> queryInfoWithLine(Map<String, Object> parameter);
    List<EarthquakeInfo> getHistoryList(String name);
    boolean judgeEarthquakeExist(@Param("name") String name, @Param("time") LocalDateTime time);
    List<EarthquakeInfo> getSeismicZonesData(Double left,Double right,Double top,Double bottom);
}
